<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <button @click="next">下一张</button>
    <img :src="imgArr[imgIndex]" alt="">
  </div>
  <script src="./vue.js"></script>
  <script>
    /* 
      https://88hds-1251052172.cos.ap-beijing.myqcloud.com/66tup/3963/5b7c2602e10fc229.jpg
      https://88hds-1251052172.cos.ap-beijing.myqcloud.com/66tup/5354/5f93b2e3b1bd5440.jpg
      https://88hds-1251052172.cos.ap-beijing.myqcloud.com/66tup/5799/5f94243f911cb197.jpg
    */
    const vm = new Vue({
      el: '#app',
      data: {
        imgIndex: 0,
        imgArr: [
          'https://88hds-1251052172.cos.ap-beijing.myqcloud.com/66tup/3963/5b7c2602e10fc229.jpg',
          'https://88hds-1251052172.cos.ap-beijing.myqcloud.com/66tup/5354/5f93b2e3b1bd5440.jpg',
          'https://88hds-1251052172.cos.ap-beijing.myqcloud.com/66tup/5799/5f94243f911cb197.jpg'
        ]
      },
      methods: {
        next(){
          this.imgIndex++;
          this.imgIndex = this.imgIndex % this.imgArr.length;
        }
      }
    })

    
  </script>
</body>
</html>